package com.hei.util;

import com.sun.corba.se.spi.ior.ObjectKey;

import java.util.HashMap;
import java.util.Map;

public class ResponseMessage {
    private int repoCode;
    private String repoMsg;
    private Map<String,Object> objectMap=new HashMap<String, Object>();

    public ResponseMessage() {
    }

    public ResponseMessage(int repoCode, String repoMsg) {
        this.repoCode = repoCode;
        this.repoMsg = repoMsg;
    }

    public int getRepoCode() {
        return repoCode;
    }

    public void setRepoCode(int repoCode) {
        this.repoCode = repoCode;
    }

    public String getRepoMsg() {
        return repoMsg;
    }

    public void setRepoMsg(String repoMsg) {
        this.repoMsg = repoMsg;
    }

    public Map<String, Object> getObjectMap() {
        return objectMap;
    }

    public void setObjectMap(Map<String, Object> objectMap) {
        this.objectMap = objectMap;
    }

   public ResponseMessage addObject(String key, Object value){
        this.objectMap.put(key,value);
        return this;
   }

    public static ResponseMessage success(int msg, String message){
        return new ResponseMessage(msg,message);
   }

}
